﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ProfileSubtype.cs" company="DissingNelleman">
//   
// All rights reserved. </copyright>
// <summary>
//   The profile subtype.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace ServiceLibrary.Models.Domain
{
    using NHibernate.Mapping.ByCode.Conformist;

    using ServiceLibrary.Models.Base;

    /// <summary>
    /// The profile subtype.
    /// </summary>
    public class ProfileSubtype : Entity
    {
        #region Public Properties

        /// <summary>
        /// Gets or sets the name.
        /// </summary>
        public virtual string Name { get; set; }

        /// <summary>
        /// Gets or sets the type.
        /// </summary>
        public virtual ProfileType Type { get; set; }

        #endregion
    }

    /// <summary>
    /// The profile sub type mapping.
    /// </summary>
    public class ProfileSubTypeMapping : ClassMapping<ProfileSubtype>
    {
        #region Constructors and Destructors

        /// <summary>
        /// Initializes a new instance of the <see cref="ProfileSubTypeMapping"/> class.
        /// </summary>
        public ProfileSubTypeMapping()
        {
            this.Property(x => x.Name);
            this.ManyToOne(x => x.Type);
        }

        #endregion
    }
}